package CCRMClient.Controllers;
import Common.*;
import Common.Entities.*;
/**
 *  This class implements client side actions regarding sales
 * @author Oz Mouchtar
 *
 */

public class ClientSaleManager {

	/**
	 * This method creates a request for add a new sale to the DB
	 * @param command - server command name
	 * @param sale - sale to add
	 * @return - server request with the relevant parameters
	 */
	public static ServerRequest addSale(SERVER_COMMANDS command, Sale sale){
		ServerRequest request = new ServerRequest(command ,null ,sale);
		return request;
		
	}
	/**
	 * This method creates a request for assigning customers to salesmen.
	 * @param command
	 * @param taskforce
	 * @return ServerRequest to send to the server.
	 */
	public static ServerRequest assigneToSale(SERVER_COMMANDS command, SalesTaskForce taskforce){
		return new ServerRequest(command, null, taskforce);
	}
	/**
	 * This method creates a request for salesman's sales list.   
	 * @param command
	 * @param salesmanID 
	 * @return ServerRequest with send to the server.
	 */
	
	public static ServerRequest showSalesForSalesman(SERVER_COMMANDS command, String salesmanID){
		return new ServerRequest(command, null, salesmanID);
	}
	
	/**
	 * This method creates request for showing sale details.
	 * @param command
	 * @param saleID
	 * @return
	 */
	public static ServerRequest getSaleDetails(SERVER_COMMANDS command, Integer saleID){
		return new ServerRequest(command, null, saleID);
	}
	public static ServerRequest getApprovedTemplates(SERVER_COMMANDS command) {
		return new ServerRequest (command, null, null);
	}
	
	
	/*public static ServerRequest getSalesManAndCustomers(SERVER_COMMANDS command, Sale sale){
		return new ServerRequest (command, null, sale);
	}*/
	/*public static ServerRequest addSale(SalesmenAndCustomersForSale data){
		return new ServerRequest (SERVER_COMMANDS.ADD_SALE, null, data);
	}*/

}
